﻿using System;
using System.Collections.Generic;

namespace SolidDemo.Business.Interfaces
{
    public interface IGenericRepository: IDisposable
    {
        T LoadById<T>(int id, string label = "Id", List<string> includes = null) where T : class;

        T LoadByCode<T>(string code, string label = "Code", List<string> includes = null) where T : class;

        List<T> LoadAll<T>(List<string> includes = null) where T : class;

        IEnumerable<T> FilterByString<T>(string label, string value, List<string> includes = null) where T : class;

        void Save<T>(T entity) where T : class;
    }
}
